#define _CRT_SECURE_NO_WARNINGS	

#include<stdio.h>
#include<math.h>

int main()
{
    int n;
    scanf("%d", &n);
    int find = 0;
    for (int i = 1; i < sqrt(n); i++)
    {
        if (sqrt(n - i * i) - (int)sqrt(n - i * i) == 0 && i < (int)sqrt(n - i * i))
        {
            find = 1;
            printf("%6d%6d\n", i, (int)sqrt(n - i * i));
        }
    }
    if (!find)
        printf("No Solution\n");
    return 0;
}